package com.wsj.a.collapsingdemo.adapter;

import android.content.Context;
import android.databinding.DataBindingUtil;
import android.support.annotation.NonNull;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;

import com.wsj.a.collapsingdemo.R;
import com.wsj.a.collapsingdemo.databinding.ItemSplashImageBinding;

/**
 * Created by linxiujie on 2018/8/15.
 */

public class SplashImageAdapter extends RecyclerView.Adapter<SplashImageAdapter.ViewHolder> {

    public SplashImageAdapter(Context context){}

    @NonNull
    @Override
    public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
        ItemSplashImageBinding itemSplashImageBinding = DataBindingUtil.inflate(LayoutInflater.from(parent.getContext()),R.layout.item_splash_image,null,false);
        return new ViewHolder(itemSplashImageBinding.getRoot());
    }

    @Override
    public void onBindViewHolder(@NonNull ViewHolder holder, int position) {

    }

    @Override
    public int getItemCount() {
        return Integer.MAX_VALUE;
    }

    public class ViewHolder extends RecyclerView.ViewHolder {

        ImageView item_bg;

        public ViewHolder(final View itemView) {
            super(itemView);
            item_bg = itemView.findViewById(R.id.item_bg);
        }

    }
}
